package threadLearn;

/**
 * 可重入粒度测试二：调用另个同步方法
 * @author 12609
 *
 */
public class SynchronizedOtherMethod {
	public synchronized void method1() {
		System.out.println("method1....");
		method2();
	}

	private synchronized void method2() {
		System.err.println("method2...");
	}

	public static void main(String[] args) {
		SynchronizedOtherMethod sm = new SynchronizedOtherMethod();
		sm.method1();
	}
}
